﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// NhomThucPham Repository. Good example of CRUD operations.
    ///// </summary>
    public class NhomThucPhamRepository : INhomThucPhamRepository
    {
        private static readonly INhomThucPhamDao _nhomThucPham = DataAccess.NhomThucPhamDao;
        public List<NhomThucPham> GetList()
        {
            return _nhomThucPham.GetNhomThucPham().ToList();
        }

        public NhomThucPham Get(string id)
        {
            return _nhomThucPham.GetNhomThucPhamByID(id);
        }

        public void Insert(NhomThucPham t)
        {
            _nhomThucPham.InsertNhomThucPham(t);
        }

        public void Update(NhomThucPham t)
        {
            _nhomThucPham.UpdateNhomThucPham(t);
        }

        public void Delete(NhomThucPham t)
        {
            _nhomThucPham.DeleteNhomThucPham(t);
        }
    }
}